package com.example.mymicaihu.adapter.network;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.example.mvplibrary.adapter.BaseAdapter;
import com.example.mvplibrary.adapter.BaseViewHolder;
import com.example.mymicaihu.R;
import com.example.mymicaihu.bean.network.WorkBean;

import java.util.List;

/**
 * 作者：朱勇闯
 * data : 2021/5/5  15:46
 * 作用： xxxx
 */
public class WorkImageAdapter extends BaseAdapter<String> {
    private static final String TAG = "朱勇闯WorkAdapter";
    public WorkAdapter.ItemListener itemListener;

    public void setItemListener(WorkAdapter.ItemListener itemListener) {
        this.itemListener = itemListener;
    }

    public WorkImageAdapter(List<String> datas, Context context, int layoutId) {
        super(datas, context, layoutId);
    }

    @Override
    protected void bindData(BaseViewHolder holder, String listBean, int position) {
        ImageView image = holder.getView(R.id.iv_work1);
        Glide.with(context).load(listBean).into(image);
    }

    public interface ItemListener {
        void onItemClickListener(int pos);
    }

}
